package order;

import com.qst.beans.Order;
import com.qst.beans.OrderItem;
import com.qst.service.OrderService;
import com.qst.service.impl.OrderServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;
import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext.xml"})
public class OrderItems {
    @Resource
    private OrderServiceImpl orderService;

    @Test
    public void getUPRelation(){
        List<OrderItem> allOrder = orderService.getAllOrderItem();
        for(OrderItem order : allOrder){
            System.out.println(order);
        }
    }
}
